//
// Created by alexa on 5/21/2024.
//

#ifndef ARTILLERYSYSTEM_MISSILESSERVICE_H
#define ARTILLERYSYSTEM_MISSILESSERVICE_H

#include "../../repositories/missile-repository/MissileRepository.h"

class UnitsService;

class MissilesService {
private:
    MissileRepository repository;
    UnitsService *unitsService;
public:
    void setUnitsService(UnitsService *unitsService);

    Missile *getById(string id);

    vector<Missile *> getAll();

    void saveMissile(Missile *missile);

    Missile *createOne(std::string name, int calibre, float length, float weight, float flightRange, float impactArea, float speed);

    void deleteOne(string id);

    friend class MainService;
};

#include "../combat-units-service/UnitsService.h"

#endif //ARTILLERYSYSTEM_MISSILESSERVICE_H
